﻿use INGEBET 
go


if not exists (select 1 from Sport where [NOM_SPORT] = 'FOOTBALL')
INSERT INTO Sport(NOM_SPORT) VALUES ('FOOTBALL')

if not exists (select 1 from Sport where [NOM_SPORT] = 'VOLLEYBALL')
INSERT INTO Sport(NOM_SPORT) VALUES ('VOLLEYBALL')

if not exists (select 1 from Sport where [NOM_SPORT] = 'BASKETBALL')
INSERT INTO Sport(NOM_SPORT) VALUES ('BASKETBALL')

if not exists (select 1 from Sport where [NOM_SPORT] = 'RUGBY')
INSERT INTO Sport(NOM_SPORT) VALUES ('RUGBY')

if not exists (select 1 from Sport where [NOM_SPORT] = 'HANDBALL')
INSERT INTO Sport(NOM_SPORT) VALUES ('HANDBALL')

if not exists (select 1 from Sport where [NOM_SPORT] = 'TENNIS')
INSERT INTO Sport(NOM_SPORT) VALUES ('TENNIS')

if not exists (select 1 from Sport where [NOM_SPORT] = 'FOOTBALL')
INSERT INTO Sport(NOM_SPORT) VALUES ('FOOTBALL')
if not exists (select 1 from Sport where [NOM_SPORT] = 'FOOTBALL')
INSERT INTO Sport(NOM_SPORT) VALUES ('FOOTBALL')
if not exists (select 1 from Sport where [NOM_SPORT] = 'FOOTBALL')
INSERT INTO Sport(NOM_SPORT) VALUES ('FOOTBALL')
if not exists (select 1 from Sport where [NOM_SPORT] = 'FOOTBALL')
INSERT INTO Sport(NOM_SPORT) VALUES ('FOOTBALL')


if not exists (select 1 from COMPETITION where [NOM_COMPETITION] = 'Champion League')
INSERT INTO COMPETITION (NOM_COMPETITION) VALUES ('Champion League')

if not exists (select 1 from COMPETITION where [NOM_COMPETITION] = 'Ligue 1')
INSERT INTO COMPETITION (NOM_COMPETITION) VALUES ('Ligue 1')





INSERT INTO [dbo].[TERRAIN]
           ([NOM_TERRAIN]
           ,[VILLE_TERRRAIN]
           ,[PAYS_TERRAIN])
     VALUES
           ('PARC DES PRINCES'
            ,'PARIS'
			,'FRANCE')
GO

INSERT INTO [dbo].[RENCONTRE]
           ([ID_TERRAIN]
           ,[ID_COMPETITION]
           ,[DATE_RENCONTRE])
     VALUES
           (1
           ,2
           ,GETDATE())
GO

INSERT INTO [dbo].[EQUIPE]
           ([ID_SPORT]
           ,[NOM_EQUIPE])
     VALUES
           (2
           ,'PSG')
GO


INSERT INTO [dbo].[EQUIPE]
           ([ID_SPORT]
           ,[NOM_EQUIPE])
     VALUES
           (2
           ,'OM')
GO

INSERT INTO [dbo].[RENCONTRE_EQUIPE]
           ([ID_RENECONTRE]
           ,[ID_EQUIPE])
     VALUES
           (1
           ,2)
GO

INSERT INTO [dbo].[RENCONTRE_EQUIPE]
           ([ID_RENECONTRE]
           ,[ID_EQUIPE])
     VALUES
           (1
           ,1)
GO

